(reindent-then-newline-and-indent): Delete space *after*
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 27 Oct 2003 15:20:46 +0000 (15:20 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 27 Oct 2003 15:20:46 +0000 (15:20 +0000)
reindenting the first line.

lisp/simple.el

index b0d5f7295f9feecb8228ea5dfcccf38f44d8ea77..3d636de721a98a813a45d62bff770cda2c5a21ca 100644 (file)
@@ -303,14 +303,14 @@ In programming language modes, this is the same as TAB.
 In some text modes, where TAB inserts a tab, this indents to the
 column specified by the function `current-left-margin'."
   (interactive "*")
-  (delete-horizontal-space t)
   (let ((pos (point)))
     ;; Be careful to insert the newline before indenting the line.
     ;; Otherwise, the indentation might be wrong.
     (newline)
     (save-excursion
       (goto-char pos)
-      (indent-according-to-mode))
+      (indent-according-to-mode)
+      (delete-horizontal-space t))
     (indent-according-to-mode)))
 
 (defun quoted-insert (arg)